hvmloader: fix scratch_alloc to avoid overlaps
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 10 Feb 2016 13:46:45 +0000 (14:46 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 10 Feb 2016 13:46:45 +0000 (14:46 +0100)
commit4ab3ac074cb1f101f42e02103fa263a1f4f422b5
tree0ebbb80f54749ccc1e9663b67aac3be881d7f515
parentdc8080fe7fba71b8c44c230ca0d0d1ae4467e690
hvmloader: fix scratch_alloc to avoid overlaps

scratch_alloc() set scratch_start to the last byte of the current
allocation.  The value of scratch_start is then reused as is (if it is
already aligned) in the next allocation.  This result in a potential reuse
of the last byte of the previous allocation.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/firmware/hvmloader/util.c